package user.profile;

/**
 * This is the flags used to represent the info stored in a profile.
 * 
 * @author htrmeira@gmail.com
 *
 */
public enum Flags {
	NAME("nome_exibicao"), EMAIL("email"), GENDER("sexo"), 
	BIRTH("dataNasc"), ADDRESS("endereco"), INTERESTS("interesses"), 
	DESCRIPTION("quem_sou_eu"), MOVIES("filmes"), MUSICS("musicas"), 
	BOOKS("livros"), PASSWORD("password"), LOGIN("login"), UID("uid");
	
	private String flag;

	/**
	 * This is constructor of this enum, the attributes are statically accessed, so
	 * this for internal use only.
	 * 
	 * @param flag The flag used.
	 */
	Flags (String flag) {
		this.flag = flag;
	}

	/**
	 * Provides the {@link String} that represents the flag.
	 * 
	 * @return The flag in a {@link String} format.
	 */
	public String getFlag() {
		return flag;
	}
	
	/**
	 * This method return all the flags i this enum.
	 * 
	 * @return The flags in a {@link String} format inside the array.
	 */
	public static String[] getFlags() {
		String[] flags = new String[Flags.values().length];
		for (int i = 0; i < flags.length; i++) {
			flags[i] = Flags.values()[i].getFlag();
		}
		return flags;
	}

}